#!/bin/bash

INSTALLED_PATH=/opt/keepalived
KEEPALIVED_VERSION=1.2.19
KEEPALIVED_PKG=keepalived-${KEEPALIVED_VERSION}.tar.gz

if [ ! -f $KEEPALIVED_PKG ]; then
    wget http://www.keepalived.org/software/$KEEPALIVED_PKG
fi
if [ ! -d keepalived-${KEEPALIVED_VERSION} ]; then
    tar xf $KEEPALIVED_PKG
fi
cd keepalived-${KEEPALIVED_VERSION}
./configure --prefix=$INSTALLED_PATH
make && make install
